<?php

declare(strict_types=1);

namespace App\Http\Controllers\App;

use App\Http\Controllers\BaseController;
use App\Repositories\UserRepository;
use App\Resource\User\SearchResource;
use App\Response\Response;
use Illuminate\Http\Request;

class UserController extends BaseController
{
    //活动信息
    public function search(Request $request)
    {
        $repo = new UserRepository();
        $userCode = (int) $request->input('user_code');
        $result = $repo->search($userCode);
        return Response::sendData(SearchResource::collection($result));
    }

}